package com.hongmeng.teamwork.service.impl;

import com.hongmeng.teamwork.entity.po.TeamworkTaskUserRel;
import com.hongmeng.teamwork.mapper.TeamworkTaskUserRelMapper;
import com.hongmeng.teamwork.service.ITeamworkTaskUserRelService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * (HongmengTeamworkTaskUserRel)表服务实现类
 *
 * @author makejava
 * @since 2023-11-16 11:12:05
 */
@Service
public class ITeamworkTaskUserRelServiceImpl implements ITeamworkTaskUserRelService {
    @Resource
    private TeamworkTaskUserRelMapper teamworkTaskUserRelMapper;

    @Override
    public List<TeamworkTaskUserRel> queryByCondition(TeamworkTaskUserRel teamworkTaskUserRel) {
        return this.teamworkTaskUserRelMapper.queryByCondition(teamworkTaskUserRel);
    }

    @Override
    public boolean insert(TeamworkTaskUserRel teamworkTaskUserRel) {
        return this.teamworkTaskUserRelMapper.insert(teamworkTaskUserRel) > 0;
    }

    @Override
    public void batchInsert(List<TeamworkTaskUserRel> teamworkTaskUserRelList) {
        this.teamworkTaskUserRelMapper.insertBatch(teamworkTaskUserRelList);
    }

    @Override
    public boolean deleteByTaskId(Long taskId) {
        return this.teamworkTaskUserRelMapper.deleteByTaskId(taskId) > 0;
    }

    @Override
    public void updateByTaskId(TeamworkTaskUserRel teamworkTaskUserRel) {
        this.teamworkTaskUserRelMapper.updateByTaskId(teamworkTaskUserRel);
    }

    @Override
    public TeamworkTaskUserRel queryTaskId(Long taskId) {
        return this.teamworkTaskUserRelMapper.queryTaskId(taskId);
    }
}
